﻿<?php

class EnterController extends Zend_Controller_Action
{
	/*
	 * Action for showing start form
	 */
	function indexAction()
	{
		$this->view->title = "Начало";
		
		$form = new EnterForm();
		$this->view->form = $form;
		$form->setAction('settings');
		$form->setMethod('post');

	}
	
	/*
	 * Action for showig setting form, 
	 * whitch takes couple params from start form
	 */
	function settingsAction()
	{
		if($this->_request->isPost()){
			$formEnterdata = $this->_request->getParams();
			
			if($formEnterdata['projectnum'] != NULL && $formEnterdata['location'] != NULL){
				$form = new SettingForm();
				$this->view->form = $form;
				$this->view->projnum = $formEnterdata['projectnum'];
				$this->view->location = $formEnterdata['location'];
			}else echo 'not all params sets';
		}else echo 'no post';
	}

}
